import request from '@/utils/request'

// 查询监测项历史数据列表
export function listHistory(query) {
  return request({
    url: '/slope/history/list',
    method: 'get',
    params: query
  })
}

// 查询监测项历史数据列表通过传感器
export function listHistoryBySensor(query) {
  return request({
    url: '/slope/history/listBySensor',
    method: 'get',
    params: query
  })
}

// 查询监测项历史数据详细
export function getHistory(itemHistoryId) {
  return request({
    url: '/slope/history/getInfo/' + itemHistoryId,
    method: 'get'
  })
}

// 新增监测项历史数据
export function addHistory(data) {
  return request({
    url: '/slope/history/add',
    method: 'post',
    data: data
  })
}

// 修改监测项历史数据
export function updateHistory(data) {
  return request({
    url: '/slope/history/updateHistory',
    method: 'post',
    data: data
  })
}

// 删除监测项历史数据
export function delHistory(itemHistoryId) {
  return request({
    url: '/slope/history/remove/' + itemHistoryId,
    method: 'post'
  })
}

// 导出监测项历史数据
export function exportHistory(query) {
  return request({
    url: '/slope/history/export',
    method: 'get',
    params: query
  })
}

// 导出数据报表
export function exportHistory2(query) {
  return request({
    url: '/slope/history/exportReport',
    method: 'get',
    params: query
  })
}

